package com.xbongbong.saas.service;

import com.xbongbong.paas.pojo.dto.ConditionListDTO;
import com.xbongbong.paas.pojo.vo.ConditionListVO;
import com.xbongbong.paas.toolbox.exception.XbbException;
import com.xbongbong.paas.toolbox.wrap.BaseVO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleAddDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleDeleteDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleDetailDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleEnableDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleListDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleRepeatDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreRuleSaveDTO;
import com.xbongbong.pro.score.pojo.dto.ScoreScriptLogDTO;
import com.xbongbong.pro.score.pojo.vo.ScoreRuleDetailVO;
import com.xbongbong.pro.score.pojo.vo.ScoreRuleListVO;
import com.xbongbong.pro.score.pojo.vo.ScoreRuleSaveVO;

/**
 * @author chunyang.qin
 * @Title: 评分规则
 * @date 2020/11/28
 */
public interface ScoreRuleService {


    /**
     * 获取该表单下所有的评分规则
     * @param
     * @return
     * @throws XbbException
     */
    ScoreRuleListVO listScoreRule(ScoreRuleListDTO scoreRuleListDTO) throws XbbException;

    /**
     * 获取评分规则详情
     * @param
     * @return
     * @throws XbbException
     */
    ScoreRuleDetailVO getScoreRule(ScoreRuleDetailDTO scoreRuleDetailDTO) throws XbbException;
//
//    /**
//     * 根据formId查询评分规则
//     * @param scoreRuleDetailDTO
//     * @return
//     * @throws XbbException
//     */
//    ScoreRuleDetailVO getScoreRuleByFormId(ScoreRuleDetailDTO scoreRuleDetailDTO) throws XbbException;

    /**
     * 打开新建页面（主要是获取解释）
     * @param scoreRuleAddDTO
     * @return
     * @throws XbbException
     */
    ScoreRuleSaveVO getAddVo(ScoreRuleAddDTO scoreRuleAddDTO) throws XbbException;

    ScoreRuleSaveVO getUpdateVo(ScoreRuleDetailDTO scoreRuleDetailDTO) throws XbbException;

    /**
     * 保存评分规则(新建或者编辑)
     * @param scoreRuleSaveDTO
     * @return
     * @throws XbbException
     */
    BaseVO saveScoreRule(ScoreRuleSaveDTO scoreRuleSaveDTO) throws XbbException;

    /**
     * 启用或者禁用,评分规则
     * @param scoreRuleEnableDTO
     * @return
     * @throws XbbException
     */
    BaseVO enableScoreRule(ScoreRuleEnableDTO scoreRuleEnableDTO) throws XbbException;

    /**
     * 删除 评分规则
     * @param scoreRuleDeleteDTO
     * @return
     * @throws XbbException
     */
    BaseVO deleteScoreRule(ScoreRuleDeleteDTO scoreRuleDeleteDTO) throws XbbException;

    /**
     * 校验评分规则名称是否重复
     * @param scoreRuleRepeatDTO
     * @return
     * @throws XbbException
     */
    BaseVO repeatScoreRule(ScoreRuleRepeatDTO scoreRuleRepeatDTO) throws XbbException;



    /**
     * 获取评分规则的流转条件 展示符号 （大于 小于）
     * @param conditionListDTO
     * @return
     * @throws XbbException
     */
    ConditionListVO getScoreRuleCondition(ConditionListDTO conditionListDTO) throws XbbException;

    /**
     * 判读该表单下是否有 启用的评分区间
     * @param corpid
     * @param formId
     * @return
     * @throws XbbException
     */
    Boolean haveEnabledScoreRule(String corpid , Long formId) throws XbbException;

}
